<?php
if(isset($javascript)):
    // load script in <head> section
    $javascript->link('scriptaculous/lib/prototype', false);
    $javascript->link('scriptaculous/src/scriptaculous', false);
endif;

echo $this->requestAction(array('controller'=>'ajaxes','action'=>'calendar'));
?>
<a href="#" onclick="Effect.Appear('ical')"><?php __('Export iCal')?></a>
<div id="ical" style="display:none;">
    <div id="ical_link">
        <?php 
        __('Please use the following address to access this calendar from other applications. You can copy and paste this into any calendar product that supports the iCal format.');
        echo '<br/>';
        $ical_link = Configure::read('server_url').'/upload/ics/'.$auth_user['User']['username'].'.ics';
        echo $html->link($ical_link,array('controller'=>'committees','action'=>'cal',0,$auth_user['User']['username']));
        ?>
    </div>
    <div class="button"  style='display:block;cursor:pointer;' onclick="Effect.Fade('ical');">
        <?php __('Close')?>
    </div>
    
</div>
